package com.zz.parkingsystem.service.impl;

import com.zz.parkingsystem.dto.ParkDTO;
import com.zz.parkingsystem.entity.Parking;
import com.zz.parkingsystem.mapper.ParkingMapper;
import com.zz.parkingsystem.service.PCParkService;
import com.zz.parkingsystem.vo.AllGeoVO;
import com.zz.parkingsystem.vo.AllInsVO;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import javax.xml.crypto.Data;
import java.util.Date;
import java.util.List;

@Service
public class PCParkServiceImpl implements PCParkService {
    @Resource
    private ParkingMapper parkingMapper;


    @Override
    public List<Parking> selectPark() {
        return parkingMapper.selectPark();
    }

    @Override
    public List<Parking> getAllParkExcel(ParkDTO parkDto) {
        return parkingMapper.getAllParkExcel(parkDto);
    }

    @Override
    public Long getCount(ParkDTO parkDto) {
        return parkingMapper.getCount(parkDto);
    }

    @Override
    public List<Parking> getAllPark(ParkDTO parkDto) {
        return parkingMapper.getAllPark(parkDto);
    }

    @Override
    public int deleteByPrimaryKey(Long id) {
        return parkingMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insertSelective(Parking record) {
        record.setPkCreatedTime(new Date());
        return parkingMapper.insertSelective(record);
    }

    @Override
    public Parking selectByPrimaryKey(Long id) {
        return parkingMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(Parking record) {
        return parkingMapper.updateByPrimaryKeySelective(record);
    }
}
